package cn.com.cifi.mars.web.action.sys;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.bean.vo.sys.req.UpdateSysProjectFetchNumberParam;
import cn.com.cifi.mars.bean.vo.sys.rsp.SysProjectFetchNumberVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/sysProjectFetchNumber")
public interface ISysProjectFetchNumberController {

	@ApiOperation(value = "分页显示项目取数", notes = "分页显示项目取数")
	@GetMapping(value = "")
	public R<SysProjectFetchNumberVo> getSysProjectFetchNumber(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
			@ApiParam(value = "每页条数", required = true, defaultValue = "2") @RequestParam(value = "pageSize") String pageSize,
			@ApiParam(value = "区域id", required = false) @RequestParam(name = "regionId", defaultValue = "") String regionId,
			@ApiParam(value = "项目id", required = false) @RequestParam(name = "projectId", defaultValue = "") String projectId,
			@ApiParam(value = "取数系统id", required = false) @RequestParam(name = "countingSystemId", defaultValue = "") String countingSystemId,
			@ApiParam(value = "生效开始日期", required = false) @RequestParam(name = "beginTime", defaultValue = "") String beginTime,
			@ApiParam(value = "生效结束日期", required = false) @RequestParam(name = "endTime", defaultValue = "") String endTime,
			@ApiParam(value = "城市id", required = false) @RequestParam(name = "cityId", defaultValue = "") String cityId,
			@ApiParam(value = "分期id", required = false) @RequestParam(name = "stagesId", defaultValue = "") String stagesId);

	@ApiOperation(value = "更改取数系统", notes = "更改取数系统")
	@PutMapping(value = "")
	public R<String> updateSysProjectFetchNumber(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@RequestBody UpdateSysProjectFetchNumberParam param);

	@ApiOperation(value = "增量拉取主数据到项目取数表(前端勿动)", notes = "增量拉取主数据到项目取数表(前端勿动)")
	@PostMapping(value = "projectFetchNumberV2")
	public R<String> createSysProjectFetchNumberV2(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "项目id", required = true) @RequestParam(name = "projectId", defaultValue = "") String projectId);

	@ApiOperation(value = "删除项目取数", notes = "删除项目取数")
	@DeleteMapping(value = "")
	public R<String> deleteSysProjectFetchNumber(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "项目取数id", required = true) @RequestParam(name = "id", defaultValue = "") String id);

}
